package com.mysoap.medicine.bean;

import java.util.HashSet;
import java.util.Set;

public class SetUtils {

	public static void main(String[] args) {
		String[] aa = { "1", "2" };
		HashSet<String> set = arrToSet(aa);
		for (String string : set) {
			System.out.println(string);
		}

	}

	public static HashSet arrToSet(Object[] objects) {
		HashSet s = new HashSet();
		if (objects != null) {
			for (Object object : objects) {
				s.add(object);
			}
		}
		return s;
	}
}
